




import java.util.Arrays;
import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner input = new Scanner(System.in);
        int i = input.nextInt();
        String[] ss = new String[i];
        int a =0;
        
        while(a<i) {
        	
        	ss[a]=input.next();
        	a++;
        }
        Arrays.sort(ss);
        for(String s :ss) {
        	System.out.println();
        	System.out.println(s);
        }
    }
    
}


